package com.sxz.sbs.module.client.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sxz.sbs.R;
import com.sxz.sbs.module.client.bean.DealScheduleBean;

import java.util.List;

/**
 * 交易进度列表
 * @author hp
 */

public class DealScheduleAdapter extends BaseQuickAdapter<DealScheduleBean,BaseViewHolder>{

    public DealScheduleAdapter(@Nullable List<DealScheduleBean> data) {
        super(R.layout.item_dealschedule,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, DealScheduleBean item) {
        helper.setText(R.id.tv_clientdetails,item.getDate_RecordTime());
        helper.setText(R.id.tv_client_mes,item.getTxt_Content());
        if (helper.getPosition()==0) {
            helper.setBackgroundRes(R.id.view_circle, R.drawable.shape_circle_bg);
        }
        if (helper.getPosition()==mData.size()-1){
            helper.setVisible(R.id.view_line,false);
        }

    }
}
